<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>切换的导航条</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="main.js"></script>


    <style type="text/css">


        .box{
             width: 300px;
             height: 300px;
             border: 1px solid  red;
             overflow: hidden;
        }
        #div1,#div2,#div3{
             width: 300px;
             height: 300px;
        }

        #div1{
              background-color: pink;
        }

        #div2{
             background-color: red;
        }

        #div3{
             background-color: yellowgreen;
        }
  </style>

</head>
<body>
        <a href="#div1">div1</a>
        <a href="#div2">div2</a>
        <a href="#div3">div3</a>


        <div class="box">
            
             <div id="div1"></div>
             <div id="div2"></div>
             <div id="div3"></div>

        </div>

</body>
</html>
